\appendixtitleon
\appendixtitletocon

 \appendixheaderon

% begin appendix
% \appendix

% add "Appendix" to the section heading
% \let\oldthesection\thesection
%   \renewcommand{\thesection}{0 \oldthesection}

% example (otherwise, use just \section)
% \renewcommand{\thesubsection}{uppu}
% \renewcommand{\appendixname}{appname}
% \renewcommand\thesection{\arabic{section} }%

\addappheadtotoc
\begin{appendices}

% \newcommand{\ap}[1]{ \section{pielikums #1}}
\newcommand{\ap}[1]{\section{#1}}
\renewcommand\thesection{\arabic{section}}%

\ap{Admin.fragment-definition.xml pirmkods}
\label{ap:fragment-def}
\inputminted[ linenos, fontsize=\footnotesize ]%
{ xml }{source/Admin.fragment-definition.xml}

\ap{admin-lo.fragment-layout.xml pirmkods}
\label{ap:fragment-layout}
\inputminted[ linenos, fontsize=\footnotesize ]%
{ xml }{source/admin-lo.fragment-layout.xml}

\ap{personDirectoryContext.xml pirmkoda fragments}
\label{ap:pagsdao}
\inputminted[ linenos, fontsize=\footnotesize ]%
{xml}{source/pagsdao.xml}

\ap{personDirectoryContext.xml pirmkoda piemērs}
\label{ap:ldapdao}
\inputminted[ linenos, fontsize=\footnotesize ]%
{xml}{source/groupsource.xml}

\ap{PAGSGroupStoreConfig.xml fragments}
\label{ap:pagsstore}
\inputminted[ linenos, fontsize=\footnotesize ]%
{ xml }{source/pagsstore.xml}


\end{appendices}
%\renewcommand\thesection{\@Alph\c@section}

% \appendixpage
% \section{Pirmkodi}
% \subsection{}
